package com.qidianit.mes.pojo.pro;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qidianit.mes.pojo.Customer;
import com.qidianit.mes.pojo.Material;
import com.qidianit.mes.pojo.SysDictData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @ Description:
 * @ Author: DuYaTao
 * @ Date: 2025/9/22 - 15:57
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductionOrder {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String productionOrderCode;
    private String productionOrderName;
    private Byte productionOrderSource;
    private Byte productionOrderType;
    private String orderCode;
    private String materialCode;
    private Integer productionOrderQuantity;
    private String customerCode;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate requestDate;
    private Byte status;
    private String qrCodeUrl;
    private String materialName;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;
    private Integer creatorId;
    private Integer updatorId;
    @TableField("delete_flag")
    private Byte deleteFlag = 0;

    private SysDictData statusDictData;
    private SysDictData typeDictData;
    private Customer customer;
    private Material material;

}
